<%@page language="java" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>ITSM</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="运维,监控,网管">
	<meta http-equiv="description" content="ITSM">
	
	<link rel="stylesheet" type="text/css" href="<%=path%>/extjs/resources/css/ext-all.css"/>
	<link rel="stylesheet" type="text/css" href="<%=path%>/css/oitsm.css"/>
	<style>
		#loading-mask {
			position: absolute;
			left: 0;
			top: 0;
			width: 100%;
			height: 100%;
			z-index: 20000;
			background-color: white;
		}
		#loading {
			position: absolute;
			left: 45%;
			top: 40%;
			padding: 2px;
			z-index: 20001;
			height: auto;
		}
		#loading a {
			color: #225588;
		}
		#loading .loading-indicator {
			background: white;
			color: #444;
			font: 12px tahoma, arial, helvetica;
			padding: 10px;
			margin: 0;
			height: auto;
		}
	</style>
  </head>
  
  <body style="height:100%;width:100%;padding:0px;">
  	<div id="loading-mask" style=""></div>
	<div id="loading">
		<div class="loading-indicator">
			<img src="<%=path%>/extjs/extanim32.gif" width="32"
				height="32"
				style="margin-right: 8px; float: left; vertical-align: top;" />
			Open ITSM
			<br />
			<span id="loading-msg-progress">下载页面所需文件...</span>
		</div>
	</div>
	<script type="text/javascript"  src="<%=path%>/extjs/bootstrap.js" ></script>
	<script type="text/javascript" src="<%=path%>/core/engine.js"></script>
	<script type="text/javascript" src="<%=path%>/cmps/home/homePanel.js"></script>
	<script type="text/javascript" src="<%=path%>/core/frame.js"></script>
	<script>
		var Browser = { 
			'isIE' : (navigator.userAgent.indexOf('MSIE') >= 0) && (navigator.userAgent.indexOf('Opera') < 0), 
			'isFirefox' : navigator.userAgent.indexOf('Firefox') >= 0, 
			'isOpera' : navigator.userAgent.indexOf('Opera') >= 0 
		}; 
		if(Browser.isIE){
			//屏蔽回退键
			document.onkeydown   =   function(){  
				if(((event.srcElement.tagName =='INPUT' || event.srcElement.tagName =='TEXTAREA') && event.srcElement.readOnly)||(event.srcElement.tagName!='TEXTAREA' && event.srcElement.tagName!='INPUT')){   
					if(event.keyCode==8){   
						event.cancelBubble  =  true;   
						event.returnValue  =  false;   
						return  false;   
					}   
				}   
			};  
		}
	
		//全局变量准备
		var webContext = '<%=path%>';
		
		function removeLoadingMask(){
			Ext.get('loading').remove();
			Ext.get('loading-mask').fadeOut({remove:true});
		}
		
	</script>
	
    <script type="text/javascript">
		document.getElementById('loading-msg-progress').innerHTML = '文件下载完毕,正在构建页面...';
    	Ext.onReady(function() {
    		Oitsm.initer.doInit();
    		Ext.QuickTips.init();
    		removeLoadingMask();
    		
    		var frame = new Oitsm.Frame();
    		var viewport = new Ext.Viewport({
                layout:'fit',
                border : false,
                items:[frame]
            });
    	});
    </script>
  </body>
</html>
